With the increasing number and variety of consumer electronics, it is becoming more difficult to write computer applications that can interact with each device without being modified to account for variations between the capabilities of devices. For example, a cell phone may display a list of menu options by placing each option and a number on each display line. Placing a number next to each option facilitates the selection of an option as a cell phone typically includes a numeric keypad. A POCKET PC, on the other hand, usually uses a stylus for inputting user choices and data. The menu options displayed on a POCKET PC may therefore be optimized for selection by a stylus and not include numbers as such a device typically does not have a keypad.
Furthermore, a cell phone display may have a relatively small area in which to display information. As a consequence, menus displayed on a cell phone may be unable to fit on one display screen. Thus, to display a longer menu on a cell phone may require scrolling through information. Conversely, a POCKET PC may have a relatively large area in which to display information. The same menu that required multiple pages for the cell phone to display may only require one page for the POCKET PC to display.
Two different devices may have widely disparate ways of presenting a menu and receiving user input. One device may display the menu using text and receive input through a keypad while another device may “display” the menu through audio and receive input through voice commands.
Writing a program that automatically adapts itself for each device with which it interacts places an undue burden on a programmer. One approach to solving this problem uses an extensible style sheet language (XSL). XSL may be used to transform one extensible markup language (XML) schema to another XML schema. By transforming one schema to another, XSL may be used to translate the commands a program generates for displaying information on a device into commands the display device requires.
Using XSL, however, has several disadvantages. One disadvantage is the number of style sheets required. A new application typically requires one or more new XML schemas specific to that application. Each new XML schema requires at least one new XSL style sheet for each device supported. Thus, to add one application that could be translated to N devices would require N times the number of XML schemas specific to the application. Furthermore, when a new device is created, to provide universal support from all existing applications, new style sheets for each application would be required. This causes a large up-front cost of creating such documents and a lingering cost of maintaining the documents as device features are updated or change.
Another disadvantage of using style sheets is that XSL is not well-suited for two-way interaction with a device. That is, while XSL might be used to translate a particular form onto the display of a device, other mechanisms would be required (and one or more additional style sheets) to translate responses from the device back into information the application could utilize.
Yet another disadvantage of using style sheets relates to maintaining state information regarding a display operation. In the cell phone example above in which a menu requires multiple pages and scrolling to be displayed, XSL is ill-suited for maintaining state information about which page the cell phone is currently on and which page should be sent next to the cell phone.
Thus, there is a need in the art of a method and system for interacting with devices having different capabilities.